package com.ming.mq.topic;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class TopicMQReceiver {

    @RabbitListener(queues = TopicConfig.TOPICQUEUE1)
    public void receive1(Object msg){
        log.info("queue1:{}",msg);
    }

    @RabbitListener(queues = TopicConfig.TOPICQUEUE2)
    public void receive2(Object msg){
        log.info("queue2:{}",msg);
    }

}
